//
//  ViewController.m
//  TripHelp
//
//  Created by lanou3g on 16/8/13.
//  Copyright © 2016年 110. All rights reserved.
//

#import "ViewController.h"
#import "ListTableViewController.h"

@interface ViewController ()
@property(strong, nonatomic)UITextField *textField;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSLog(@"aappapapapapapa");

    NSLog(@"我要去吃饭");
    
    self.view.backgroundColor = [UIColor colorWithRed:0.446 green:0.996 blue:1.000 alpha:1.000];
    
    self.textField = [[UITextField alloc]initWithFrame:CGRectMake(50, 64, [UIScreen mainScreen].bounds.size.width * 4 / 5, 40)];
    self.textField.placeholder = @"请输入搜索内容";
    self.textField.textAlignment = NSTextAlignmentCenter;
    self.textField.backgroundColor = [UIColor colorWithRed:0.976 green:0.358 blue:1.000 alpha:1.000];
    [self.view addSubview:self.textField];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"->" style:(UIBarButtonItemStyleDone) target:self action:@selector(nextAction)];

    NSLog(@"dfsfsdfsfsdd");


    NSLog(@"我要...");
    


    
}

-(void)nextAction{
    ListTableViewController *listVC = [ListTableViewController new];
    listVC.poiString = self.textField.text;
    [self.navigationController pushViewController:listVC animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
